vcTopology

vcTopology represents the topology data of tessellated geometry and can be used to generate simple and complex geometry, for example NURBS, meshes and splines.

See in: Overview

Module: vcGeometry

Parent: -

Children -

Referenced by: vcTriangleSet.Topology

Properties

Learn how to use properties here. The properties are also inherited from the parent class.

NameTypeAccessDescription
CurveCountIntegerRGets the total number of curves in set.
CurveLoopCountIntegerRGets the total number of curve loops in set.
FaceCountIntegerRGets the total number of faces in set.
PointCountIntegerRGets the total number of points considered boundary-corners in mesh, for example curve ends.
See more
If the set is not a mesh, gives zero. Note: To get the total number of points in set, use PointCount in vcTriangleSet.

Methods

Learn how to use methods here. The methods are also inherited from the parent class.

NameReturn TypeParametersDescription
getCurveCurveLoopIntegerInteger curveIndexReturns the index of the curve loop that the curve belongs to in the set.
See more
Parameters:
curveIndex (int): The index of the curve.

Exceptions:
IndexError: When the curveIndex is out of bounds.

Returns:
int: The index of the curve loop.
getCurveFaceIntegerInteger curveIndexReturns the index of the face that the curve belongs to in the set.
See more
Parameters:
curveIndex (int): The index of the curve.

Exceptions:
IndexError: When the curveIndex is out of bounds.

Returns:
int: The index of the face.
getCurveLengthRealInteger curveIndexReturns the length of a curve at a given index in the set. That is, the total distance along the curve.
See more
Parameters:
curveIndex (int): The index of the curve.

Exceptions:
IndexError: When the curveIndex is out of bounds.

Returns:
float: The length of the curve.
getCurveLoopCurveIntegerInteger curveLoopIndex,
Integer relativeCurveIndex
Returns the absolute index of an inner curve loop relative to its curve loop.
See more
Parameters:
curveLoopIndex (int): The index of the curve loop.
relativeCurveIndex (int): The index of the curve in the curve loop.

Exceptions:
IndexError: When the curveLoopIndex is out of bounds.

Returns:
int: The absolute index of the curve loop.
getCurveLoopCurveCountIntegerInteger curveLoopIndexReturns the total number of inner curve loops for a curve loop of face in set.
See more
Parameters:
curveLoopIndex (int): The index of the curve loop.

Exceptions:
IndexError: When the curveLoopIndex is out of bounds.

Returns:
int: Number of inner curve loops.
getCurveNeighborIntegerInteger curveIndexReturns the index of a curve neighboring another curve in the set.
See more
Parameters:
curveIndex (int): The index of the curve.

Exceptions:
IndexError: When the curveIndex is out of bounds.

Returns:
int: The index of the neighboring curve.
getCurvePointCountIntegerInteger curveIndexReturns the total number of points for a curve at a given index in the set.
See more
Parameters:
curveIndex (int): The index of the curve.

Exceptions:
IndexError: When the curveIndex is out of bounds.

Returns:
int: The number of points in the curve.
getCurvePointIndexIntegerInteger curveIndex,
Integer relativePointIndex
Returns the absolute index of point relative to its curve in the set.
See more
Parameters:
curveIndex (int): The index of the curve.
relativePointIndex (int): The index of the point. Relative to the curve.

Exceptions:
IndexError: When the curveIndex is out of bounds.

Returns:
int: The absolute point index.
getCurvePositionvcMatrixInteger curveIndex,
Real distance
Returns the position matrix of a point on the curve at the given distance along the curve.
See more
Details about the position matrix:
- Position vector: Actual position of the point on the curve.
- Normal vector: Direction of the curve at the given point (derivative of the curve position).
- Orientation vector: Aligned to face inwards of the curve's face.
- Approach vector: Surface normal of the face at the curve position.

Parameters:
curveIndex (int): The index of the curve.
distance (float): The distance along the curve.

Exceptions:
IndexError: When the curveIndex is out of bounds.

Returns:
vcMatrix: The position matrix of the point.
getCurvePositionslist[vcMatrix]Integer curveIndexReturns a list of position matrices for points along the curve.
See more
Parameters:
curveIndex (int): The index of the curve.

Exceptions:
IndexError: When the curveIndex is out of bounds.

Returns:
list[vcMatrix]: List of the position matrices of the points.
getFaceBoundvcBoundingBoxInteger faceIndexReturns the bounding box of the face.
See more
Parameters:
faceIndex (int): The index of the face.

Exceptions:
IndexError: When the faceIndex is out of bounds.

Returns:
vcBoundingBox: The bounding box.
getFaceCurveLoopIntegerInteger faceIndex,
Integer relativeCurveLoopIndex
Returns the absolute index of a curve loop relative to its face in set.
See more
Parameters:
faceIndex (int): The index of the face.
relativeCurveLoopIndex (int): The relative index of the curve loop.

Exceptions:
IndexError: When the faceIndex is out of bounds.
IndexError: When the relativeCurveLoopIndex is out of bounds.

Returns:
int: The absolute index of the curve loop.
getFaceCurveLoopCountIntegerInteger faceIndexReturns the total number of curve loops in a face.
See more
Parameters:
faceIndex (int): The index of the face.

Exceptions:
IndexError: When the faceIndex is out of bounds.

Returns:
int: The number of curve loops.
getFacePlaneIntersectionslist[list[vcMatrix]]Integer faceIndex,
vcMatrix plane
Returns a list containing lists of position matrices for points where a defined plane intersects a face.
See more
Each time a plane goes through hole in face a new list is added, thereby allowing you to infer hole points on face-plane intersection.
Details about the position matrix:
- Position vector: Actual position of point intersection.
- Normal vector: Direction along plane intersecting face.
- Orientation vector: Projected from normal of plane to surface of face using face derivate for projected direction.
- Approach vector: Surface normal of face.

Parameters:
faceIndex (int): The index of the face.
plane (vcMatrix): The plane.

Exceptions:
IndexError: When the faceIndex is out of bounds.

Returns:
list[list[vcMatrix]]: List of curves. Each curve is a list of point position matrices.
getFaceStartTriangleIntegerInteger faceIndexReturns the absolute index of first triangle of a face in set.
See more
Parameters:
faceIndex (int): The index of the face.

Exceptions:
IndexError: When the faceIndex is out of bounds.

Returns:
int: The absolute index of the first triangle.
getFaceTriangleCountIntegerInteger faceIndexReturns the total number of triangles of a face.
See more
Parameters:
faceIndex (int): The index of the face.

Exceptions:
IndexError: When the faceIndex is out of bounds.

Returns:
int: The number of triangles.
getPointvcVectorInteger pointIndexReturns the position vector of a curve end (corner point) at a given index relative to either its curve or face.
See more
Parameters:
pointIndex (int): The index of the point.

Exceptions:
IndexError: When the pointIndex is out of bounds.

Returns:
vcVector: The position of the point.
isCurveCircularBooleanInteger curveIndexChecks whether a curve at a given index in set is circular (where start and end points are same).
See more
Parameters:
faceIndex (int): The index of the face.

Exceptions:
IndexError: When the faceIndex is out of bounds.

Returns:
bool: True if a curve circular; otherwise returns False.